package cn.coconet.clothingguide.controller;

import cn.coconet.clothingguide.agent.ClothingGuideAgent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

// 提供HTTP接口，处理前端请求
@RestController
@RequestMapping("/api/guide")
public class GuideController {

    @Autowired
    private ClothingGuideAgent guideAgent;

    /**
     * 接收用户查询，返回AI导购回复
     */
    @PostMapping
    public String getGuideReply(@RequestBody String userInput) {
        return guideAgent.getReply(userInput);
    }
}